package com.emm.yixun.jobs;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.emm.yixun.common.app.base.CommonResDTO;
import com.emm.yixun.common.model.Notice;
import com.emm.yixun.common.model.dto.NoticeDto;
import com.emm.yixun.common.model.enums.IsSendEnum;
import com.emm.yixun.common.model.enums.TempTypeEnum;
import com.emm.yixun.common.response.Response;
import com.emm.yixun.common.response.ResponseList;
import com.emm.yixun.system.service.NoticeServiceFacade;

/***
 * 客户关怀消息推送
 * 描述:
 * 	当天通知: 对当天过生日及纪念日的客户进行消息推送,时间精确到分
 */
@Component
public class CustomerCarePushMsgCurrJob {
	 private static Logger logger = LoggerFactory.getLogger(CustomerCarePushMsgCurrJob.class);

	 @Autowired
	 private NoticeServiceFacade noticeServiceFacade;
	 
     @Scheduled(cron="${quartz.cron.pushCurrCusCareNotice}")
     public void pushCustomerManageMsg(){
    	 logger.info("推送客户关怀消息 job start..........");
    	 Response<CommonResDTO> response = noticeServiceFacade.customerCarePushMsgCurr();
    	 if (response.isSuccess()) {
  			logger.info("..........推送客户关怀消息创建成功..........");
  		 } else {
  			logger.info("..........推送客户关怀消息创建失败..........");
  		 }
    	 logger.info("推送客户关怀消息 job end..........");
     }
     

}
